#include <hxcpp.h>

#ifndef INCLUDED_JExternalObject
#include <JExternalObject.h>
#endif
#ifndef INCLUDED_JString
#include <JString.h>
#endif

Void JString_obj::__construct(::String s)
{
{
	HX_SOURCE_POS("Source/JString.hx",11)
	this->type = HX_CSTRING("java/lang/String");
	HX_SOURCE_POS("Source/JString.hx",12)
	this->val = s;
}
;
	return null();
}

JString_obj::~JString_obj() { }

Dynamic JString_obj::__CreateEmpty() { return  new JString_obj; }
hx::ObjectPtr< JString_obj > JString_obj::__new(::String s)
{  hx::ObjectPtr< JString_obj > result = new JString_obj();
	result->__construct(s);
	return result;}

Dynamic JString_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JString_obj > result = new JString_obj();
	result->__construct(inArgs[0]);
	return result;}

hx::Object *JString_obj::__ToInterface(const type_info &inType) {
	if (inType==typeid( ::JExternalObject_obj)) return operator ::JExternalObject_obj *();
	return super::__ToInterface(inType);
}


JString_obj::JString_obj()
{
}

void JString_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JString);
	HX_MARK_MEMBER_NAME(val,"val");
	HX_MARK_MEMBER_NAME(type,"type");
	HX_MARK_END_CLASS();
}

void JString_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(val,"val");
	HX_VISIT_MEMBER_NAME(type,"type");
}

Dynamic JString_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"val") ) { return val; }
		break;
	case 4:
		if (HX_FIELD_EQ(inName,"type") ) { return type; }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JString_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"val") ) { val=inValue.Cast< ::String >(); return inValue; }
		break;
	case 4:
		if (HX_FIELD_EQ(inName,"type") ) { type=inValue.Cast< ::String >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JString_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("val"));
	outFields->push(HX_CSTRING("type"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

static ::String sMemberFields[] = {
	HX_CSTRING("val"),
	HX_CSTRING("type"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
};

static void sVisitStatics(HX_VISIT_PARAMS) {
};

Class JString_obj::__mClass;

void JString_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("JString"), hx::TCanCast< JString_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JString_obj::__boot()
{
}

